package com.jpm.jrogue.maps
{
	import flash.utils.getTimer;
	
	/**
	 * ...
	 * @author Jonboy
	 */
	public class OutsideMap extends Map
	{
		
		public function OutsideMap()
		{
			
			var startingTime:Number = getTimer();
			
			height = 600;
			width = 600;
			create();
			
			var xPos:int, yPos:int;
			
			for (xPos = 20; xPos < width - 20; xPos++)
			{
				for (yPos = 20; yPos < height - 20; yPos++)
				{
					map[xPos][yPos].base = "L1_Terrain011";
					map[xPos][yPos].isLand = true;
				}
			}
			
			for (xPos = 0; xPos < 20; xPos++)
			{
				for (yPos = 0; yPos < height; yPos++)
				{
					map[xPos][yPos].base = "L1_Terrain004";
					map[xPos][yPos].isWater = true;
				}
			}
			
			for (xPos = width - 20; xPos < width; xPos++)
			{
				for (yPos = 0; yPos < height; yPos++)
				{
					map[xPos][yPos].base = "L1_Terrain004";
					map[xPos][yPos].isWater = true;
				}
			}
			
			for (xPos = 0; xPos < width; xPos++)
			{
				for (yPos = 0; yPos < 20; yPos++)
				{
					map[xPos][yPos].base = "L1_Terrain004";
					map[xPos][yPos].isWater = true;
				}
			}
			
			for (xPos = 0; xPos < width; xPos++)
			{
				for (yPos = height - 20; yPos < height; yPos++)
				{
					map[xPos][yPos].base = "L1_Terrain004";
					map[xPos][yPos].isWater = true;
				}
			}
			
			for (xPos = 0; xPos < width; xPos++)
			{
				for (yPos = 0; yPos < height; yPos++)
				{
					if (Math.random() * 10 > 9)
					{
						//map[xPos][yPos].object = "L1_Ceiling";
					}
				}
			}
			
			var endingTime:Number = getTimer();
			trace("Elapsed time: " + (endingTime - startingTime));
		}
	
	}

}